﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using Tomers.WPF.Localization;
using System.Globalization;

namespace iVision
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public static XmlLanguageDictionary currentDictionary = new XmlLanguageDictionary("Languages/he-IL.xml");
        public static String connectionString;
        public static DataAccessLayer.DataAccessLayer dal ;

        protected override void OnStartup(StartupEventArgs e) 
        {
            
            
            //LanguageDictionary.RegisterDictionary(CultureInfo.GetCultureInfo("en-US"), new XmlLanguageDictionary("Languages/en-US.xml")); 
            LanguageDictionary.RegisterDictionary(CultureInfo.GetCultureInfo("he-IL"), currentDictionary); 
            LanguageContext.Instance.Culture = CultureInfo.GetCultureInfo("he-IL"); 

            //Get ConnectionString
            connectionString = iVision.Properties.Settings.Default.ConnectionString;

            dal = new DataAccessLayer.DataAccessLayer(connectionString);

            base.OnStartup(e); 
        }
    }
}
